import React from 'react';
import {Row, Col, Button} from 'antd';
import Image from 'components/Image'
export default [
  {
    title: "商品清单",
    dataIndex: "itemname",
    width: 280,
    className:"bdr0",
    key:"goodImg",
    render:(v, record, index)=>{
      return {
        children: (
            <div className="order-goods-item">
                <Row>
                    <Col span={18}>
                    <div className="order-goods-info">
                        <Image src={record.itemPic} alt={record.itemname} width={70} height={70}/>
                        <p className="good-name">{record.itemname}</p>
                        <p className="t-grayer">{record.goodSpecifications}</p>
                        <p className="t-grayer">商家编码：{record.bn}</p>
                    </div>
                    </Col>
                    <Col span={6}>
                    <div className="goods-price t-right">
                        <p className="real-price"><span>&yen;{record.itemprice}</span></p>
                        <p className="t-grayer">&times;{record.itemnum}</p>
                    </div>
                    </Col>
                </Row>
            </div>
        ),
        props: {
          colSpan: 2,
        },
      }
    }
  },
  {
    title: "单价／数量",
    width: 100,
    className:"ant-table-th-right",
    key: "realPrice",
    render:()=>{
      return {
        children:{},
        props: {
          colSpan: 0,
        },
      }
    }
  },
//   {
//     title: "优惠信息",
//     width: 200,
//     className:"ant-table-th-center",
//     dataIndex: "disPrice",
//     render:(v, record, index)=><span>{record.dicDesc}&yen;{record.disPrice}</span>
//   },
  {
    title: "小计",
    width: 150,
    className: "ant-table-th-center",
    key: "realPay",
    render: (v, record, index)=><span className="font-14">&yen;{(record.itemprice * record.itemnum).toFixed(2)}</span>
  },
  /*{
   title: "商品总价",
   width: 250,
   className:"ant-table-th-center va-t",
   dataIndex: "total",
   render:(v, record, index)=>{
   const obj = {
   children: <div>
   <p className="font-14 t-price"><span>&yen;{record.payTotal}</span></p>
   <p className="price t-grayer">
   <del>&yen;{record.priceTotal}</del>
   </p>
   </div>,
   props: {},
   };
   if (index == 0) {
   obj.props.rowSpan = 3;
   }
   if (index > 0) {
   obj.props.rowSpan = 0;
   }
   return obj;
   }
   }*/
]